import service from "@/request/index.js";

// 获取栏目列表
export const getColumnListApi = (dataForm: any) => {
	return service.get('/api/cms/column/details/list', { params: dataForm })
}


// 获取栏目树
export const getColumnTreeApi = (dataForm: any) => {
	return service.get('/api/cms/column/details/tree')
}
// 保存栏目列表
export const submitColumnApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.post('/api/cms/column/details/edit', dataForm)
	} else {
		return service.post('/api/cms/column/details/add', dataForm)
	}
}

// 获取详情
export const getColumnInfoApi = (id: Number) => {
	return service.get('/api/cms/column/details/info?id=' + id)
}

// 删除
export const delColumnApi = (id: Number) => {
	return service.get('/api/cms/column/details/del?id=' + id)
}
